package com.smdk.dsminio.service;

import com.smdk.dsminio.vo.MultipartFileParam;

import java.io.IOException;

/**
 * 存储操作的service
 * Created by 神秘的凯 on 2020/11/11.
 */
public interface FileStorageService {

    /**
     * 初始化方法
     */
    public void init();

    /**
     * 上传文件方法1
     *
     * @param param
     * @throws IOException
     */
    public boolean uploadFileRandomAccessFile(MultipartFileParam param) throws IOException;

    /**
     * 上传文件方法2
     * 处理文件分块，基于MappedByteBuffer来实现文件的保存
     *
     * @param param
     * @throws IOException
     */
    public boolean uploadFileByMappedByteBuffer(MultipartFileParam param) throws IOException;

}
